﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Td.Additional.Runtime
{
    /// <summary>
    /// Data receiver class.
    /// </summary>
    public class DataReceiver : MarshalByRefObject
    {
        /// <summary>
        /// Data received.
        /// </summary>
        /// <param name="data">The data.</param>
        public void DataReceived(byte[] data)
        {
            if (data == null)
                InstanceManager.ManagerInstance.OnNewInstanceCreated();
            else
                InstanceManager.ManagerInstance.OnDataReceived(data);
        }
    }
}